import {Button} from "antd";
import {useCallback} from "react";
import {Editor, Transforms} from "slate";
import {useSlate} from "slate-react";
import MarkButton from "./MarkButton";
import BlockButton from "./BlockButton";
import './index.css';

export default () => {
  // const slate = useSlate();
  // const handleMove = useCallback(() => {
  //   Transforms.moveNodes(slate, {
  //     to: [1]
  //   });
  // }, [slate]);

  return (
    <>
      <MarkButton mark={'code'}>行内代码块</MarkButton>
      <MarkButton mark={'bold'}>加粗</MarkButton>
      <MarkButton mark={'italic'}>斜体</MarkButton>
      <MarkButton mark={'lineThrough'}>删除线</MarkButton>
      <BlockButton mark="heading-one">一级标题</BlockButton>
      <BlockButton mark="heading-two">二级标题</BlockButton>
      <BlockButton mark="code">代码块</BlockButton>
      <BlockButton mark="todo-list">todo-list</BlockButton>
      <BlockButton mark="ol">有序列表</BlockButton>
      <BlockButton mark="bulleted-list">无序列表</BlockButton>
      {/*<Button onClick={handleMove} size={"small"}>移动到0-1</Button>*/}
    </>
  )
}
